package com.baizhi.controller;

import com.baizhi.entity.Book;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/book")
public class BookController {
    @ResponseBody
    @RequestMapping("/selectAll")
    public List<Book> selectAll(){
        List<Book> bookList=new ArrayList<>();
        bookList.add(new Book(1,"三国",100));
        bookList.add(new Book(2,"西游",100));
        System.out.println("hello world");
        return bookList;
    }

}
